import React from 'react'
import './Detail.css'
export const Detail = () => {

  const editHandler = (event) => {
    event.preventDefault();  // 阻止默认行为
    event.stopPropagation(); // 阻止事件冒泡
    alert('编辑详细按钮被点击了')
  }
  const detailHandler = (event) => {
    alert('详细区域被点击了')
  }
  return (
    <div className='detail' onClick={detailHandler}>
        <p>身份证：xxxx</p>
        <p>特征：</p>
        <p>爱好：</p>
        <a href='https://www.baidu.com' className='edit-btn' onClick={editHandler}>编辑详情</a>
    </div>
  )
}
